﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>追溯流程</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <!--responsive-->
    <link rel="shortcut icon" href="../../Content/img/jridge.ico"/>
    <link rel="bookmark" href="../../Content/img/jridge.ico"/>
    <script src="../../Scripts/jquery-1.10.2.min.js"></script>
    <!--vue-->
    <script src="../../Scripts/vue-2.5.9/vue.min.js"></script>
    <!--axios-->
    <script src="../../Scripts/vue-2.5.9/axios.min.js"></script>
    <!--elementUI-->
    <script src="../../Scripts/elementUI-2.0.5/index.js"></script>
    <link rel="stylesheet" href="../../Scripts/elementUI-2.0.5/theme-chalk/index.css">
    <!-- 导出Excel -->
    <script src="../../Scripts/table-export/xlsx.core.min.js"></script>
    <script src="../../Scripts/table-export/FileSaver.js"></script>
    <script src="../../Scripts/table-export/tableexport.min.js"></script>
    <link href="../../Scripts/table-export/tableexport.min.css" rel="stylesheet" />
    <!--custom-->
    <link rel="stylesheet" href="../../Content/vue-common.css">
    <script src="../../Scripts/service/vue-service.js" ></script>
    
    <style>
        #navbar, #container{
            max-width: 10000px!important;
        }
        iframe{
            border: 0
        }
        .modal-dialog{
            max-width: 1000px;
            width: 80%;
        }
        .modal-body h4{
            margin-top: 10px;
            color: #e4393c;
        }
        
        .tip{ text-align: center;color: #ddd };
        .modal-body>div form:first-child{
            border-color:transparent 
        }
        table td{ text-align: center }
        .title{ font-weight: bold;background-color: #ffffcc }
        .specialProcess{
            text-align: left;
        }
    </style>
</head>
<body >
        <div id="app">
            <header-bar :pagename="pagename" :userinfo="userinfo"></header-bar>
            <div id="container">
                <el-row>
                    <el-row>
                        <el-col :span="24">
                            <el-form :inline="true">
                                <el-form-item>
                                    <el-input v-model="cardno" clearable></el-input>
                                </el-form-item>
                                <el-form-item>
                                    <el-select v-model="selmsg.direction">
                                      <el-option label="向前追溯" value="2"></el-option>
                                      <el-option label="向后追溯" value="1"></el-option>
                                    </el-select>
                                </el-form-item>
                                <el-form-item>
                                    <el-button type="primary" @click="getreviewflow">查询</el-button>
                                </el-form-item>
                            </el-form>
                        </el-col>
                    </el-row>
                </el-row>
                <el-row>
                    <div id="iframe_list"></div>
                </el-row>
            </div>
            <el-dialog
            title="追溯点信息"
            :visible.sync="nodeDetail_Dialog"
            width="70%">
            <div id="printView">
                <!--计划信息-->
                <table v-if="node_detail_list" style="width:100%">
                        <colgroup>
                            <col width="20%">
                            <col width="30%">
                            <col width="20%">
                            <col width="30%">
                        </colgroup>
                        <tbody >
                            <tr>
                                <td class="title">追溯点ID</td>
                                <td >{{node_detail_list.description.id}}</td>
                               <td class="title">工序名称</td>
                               <td >{{qcpProcess[node_detail_list.group.mesreportsheet[0].properties['工序对象标识']]}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mescontract.length>0">
                                <td class="title">订单号</td>
                                <td colspan="3">{{node_detail_list.group.mescontract[0].properties.internalcontractno}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mesproductionschedule.length>0">
                                <td class="title">产品名称</td>
                                <td colspan="3">{{node_detail_list.group.mesproductionschedule[0].properties['名称']}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mescontract.length>0">
                                <td class="title">型号</td>
                                <td colspan="3">{{node_detail_list.group.mescontract[0].properties.productno}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mesreportsheet.length>0">
                                <td class="title">零件名称</td>
                                <td colspan="3">{{node_detail_list.group.mesreportsheet[0].properties['零件对象标识']}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mesreportsheet.length>0">
                                <td class="title">所属车间</td>
                                <td>{{workShops[node_detail_list.group.mesreportsheet[0].properties['车间对象标识']]}}</td>
                                <td class="title">所属班组</td>
                                <td>{{teams[node_detail_list.group.mesreportsheet[0].properties['班组对象标识']]}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mesreportsheet.length>0">
                                <td class="title">操作者</td>
                                <td colspan="3">{{node_detail_list.group.mesreportsheet[0].properties['报工人']}}</td>
                            </tr>
                            <tr v-if="node_detail_list.group.mesreportsheet.length>0">
                                <td class="title">开工时间</td>
                                <td>{{node_detail_list.group.mesreportsheet[0].properties['实际开工时间']}}</td>
                                <td class="title">完工时间</td>
                                <td>{{node_detail_list.group.mesreportsheet[0].properties['报工时间']}}</td>
                            </tr>
                        </tbody>
                        <tbody v-for="list in node_detail_list.group.qcpequipment">
                            <!--设备-->
                            <tr>
                                <td class="title">使用设备</td>
                                <td colspan="3">{{list.properties['名称']}}</td>
                            </tr>
                            <tr>
                                <td class="title">设备参数</td>
                                <td colspan="3">
                                    <div>{{list.properties['编码']}}</div>
                                </td>
                            </tr>
                        </tbody>
                        <!-- 先显示当前物料 -->
                        <tbody v-for="list in node_detail_list.group.curmeswarehouseitem">
                            <!--物料-->
                            <tr>
                                    <td class="title">物料编码</td>
                                    <td>{{list.properties['物料编码']}}</td>
                                    <td class="title">物料名称</td>
                                    <td>{{list.properties['名称']}}</td>
                                  
                            </tr>
                            <tr>
                                    <td class="title">工序名称</td>
                                    <td>{{list.properties['工序名称']}}</td>
                                    <td class="title">炉批号</td>
                                    <td >{{list.properties['炉批号']}}</td>
                               
                            </tr>
                            <tr>
                                    <td class="title">所属仓库</td>
                                    <td>{{sysWarehouses[list.properties['仓库OBJID']]}}</td>
                                    <td class="title">类型</td>
                                    <td>{{list.properties['物料耗用类型']}}</td>
                            </tr>
                            <tr>
                                <td class="title">材料入库时间</td>
                                <td >{{list.properties['创建时间']}}</td>
                                <td class="title">数量</td>
                                <td>{{list.properties['数量']}}</td>
                            </tr>
                        </tbody>
                        <tbody v-if="node_detail_list.group.mesreportsheet.length>0">
                            <tr>
                                <td class="title">质检员</td>
                                <td colspan="3">{{node_detail_list.group.mesreportsheet[0].properties['质检员']}}</td>
                            </tr>
                            <tr>
                                <td class="title">合格品</td>
                                <td>{{node_detail_list.group.mesreportsheet[0].properties['合格品数量']}}</td>
                                <td class="title">不合格品</td>
                                <td>{{node_detail_list.group.mesreportsheet[0].properties['返修品数量']+node_detail_list.group.mesreportsheet[0].properties['废品数量']}}</td>
                            </tr>
                        </tbody>
                        <!-- 后显示消耗物料 -->
                        <tbody v-for="list in node_detail_list.group.consumemeswarehouseitem">
                                <!--物料-->
                                <tr>
                                        <td class="title">物料编码</td>
                                        <td>{{list.properties['物料编码']}}</td>
                                        <td class="title">物料名称</td>
                                        <td>{{list.properties['名称']}}</td>
                                      
                                </tr>
                                <tr>
                                        <td class="title">工序名称</td>
                                        <td>{{list.properties['工序名称']}}</td>
                                        <td class="title">炉批号</td>
                                        <td >{{list.properties['炉批号']}}</td>
                                   
                                </tr>
                                <tr>
                                        <td class="title">所属仓库</td>
                                        <td>{{sysWarehouses[list.properties['仓库OBJID']]}}</td>
                                        <td class="title">类型</td>
                                        <td>{{list.properties['物料耗用类型']}}</td>
                                </tr>
                                <tr>
                                    <td class="title">材料入库时间</td>
                                    <td >{{list.properties['创建时间']}}</td>
                                    <td class="title">数量</td>
                                    <td>{{list.properties['数量']}}</td>
                                </tr>
                            </tbody>
                    </table>
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="nodeDetail_Dialog = false">取 消</el-button>
                <el-button type="primary" @click="printView('printView')">打 印</el-button>
            </span>
            </el-dialog>
        </div>
    
    <script src="reviewflow.js"></script>
    <script src="index.js"></script>
    <script src="../../Template/vue-components.js" ></script>
</body>
</html>
